package org.popupcommunication.exceptions;

import java.util.Locale;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

public class UserAlreadyExistException extends Exception{
	   private static final long serialVersionUID = 5049031236161497138L;

	   private String identifier;
	   @Autowired
	   private static ApplicationContext context;	   

	    public UserAlreadyExistException( String identifier) { 
	        super(context.getMessage("user.exist", null, Locale.getDefault())+identifier);
	        this.identifier = identifier;
	    }
	    public String getIdentifier() {
	        return identifier;
	    }	

}
